package trainingcamp.day01.random;
import java.util.Random;

public class Test01 {
    public static void main(String[] args) {
        Random random1 = new Random();
        int a = random1.nextInt(1);//0<=a<1
        //公式取范围的随机数(X~Y)random.nextInt()%(Y-X+1)+X;
        int b = random1.nextInt()%2+7;
        System.out.println("a="+a);
        System.out.println("b="+b);
    }
}
